package com.manage.base;

import java.util.ArrayList;

import com.manage.model.Order;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

/**
 * 账单基类,尚未实现，以后试试
 * @author liyoro
 *
 */
public abstract class BaseOrderAdapter extends BaseAdapter {
	private LayoutInflater layoutInflater;
	private ArrayList<Order> orderList = new ArrayList();

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		return null;
	}

//	public void init() {
//		this.layoutInflater = LayoutInflater.from(paramContext);
//	}
	
	@Override
	public int getCount() {
		return this.orderList.size();
	}

	@Override
	public Object getItem(int position) {
		return this.orderList.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}
	

	public void setValue(ArrayList<Order> paramArrayList) {
		this.orderList.clear();
		this.orderList.addAll(paramArrayList);
		notifyDataSetChanged();
	}
	
	static class ViewHolder {
		TextView orderTime; // 下单时间
		TextView clientName; // 客户名
		TextView phoneNumber; // 客户电话号码
		TextView clientAddress; // 送餐地址
		TextView clientAddition; // 补充
		TextView orderContent; // 订餐内容
	}
	
}
